import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";

// import { axios } from 'axios'
// import { sveltePreProcess } from 'svelte-preprocess'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    svelte({
      // preprocess: sveltePreProcess
    }),
    // axios({

    // })
  ],
  server: {
    proxy: {
      "/api": {
        target: "http://localhost:5200",
        changeOrigin: true,
        secure: false,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
});
